<?php

use Jialeo\LaravelSchemaExtend\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateUserAuthStepEventLogsTable extends Migration
{
    const TABLE_NAME = 'user_auth_step_event_logs';
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create(self::TABLE_NAME, function (Blueprint $table) {
            $table->charset = 'utf8';
            $table->collation = 'utf8_general_ci';
            $table->comment = '用户认证步骤记录表';
            $table->increments('id');
            $table->integer('uid')->comment('用户ID');
            $table->integer('step_id')->comment('各步骤ID');
            $table->tinyInteger('type')->comment('步骤类型');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists(self::TABLE_NAME);
    }
}
